package com.xyz.service;

import com.xyz.controller.vo.NFCVo;
import com.xyz.controller.vo.ShipFlagVO;
import com.xyz.dto.PatrolTaskStateListDto;
import com.xyz.util.dto.DataResult;
import com.xyz.util.dto.LoginInfo;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface PatrolService {

    DataResult selectPatrol(LoginInfo li, int pageNum, int pageSize, String state, String worker, String treeId) throws Exception;

    DataResult selectPatrolApp(LoginInfo li, int pageNum, int pageSize, String state, String worker, String treeId, String orderCode, String strTime, String endTime) throws Exception;

    DataResult selectPatrolOne(LoginInfo li, long id) throws Exception;

    DataResult updateSkipFlag(LoginInfo li, ShipFlagVO shipFlagVO) throws Exception;

    DataResult selectNFCPatrolOne(LoginInfo li, NFCVo nfcVo);

    DataResult insertPatrol(LoginInfo li, String startDay, String startTime, long treeId, long patrolEmployeeId) throws Exception;

    DataResult updatePatrol(LoginInfo li, long id, String startDay, String startTime, long treeId, long patrolEmployeeId) throws Exception;

    DataResult deletePatrol(LoginInfo li, long id) throws Exception;

    DataResult selectPatrolTaskPreview(LoginInfo li, long id) throws Exception;

    DataResult selectPatrolTask(LoginInfo li, long id) throws Exception;


    DataResult selectPatrolPlan(LoginInfo li, int pageNum, int pageSize, String treeId, String businessType, String state) throws Exception;

    DataResult selectPatrolPlanOne(LoginInfo li, long id) throws Exception;

    DataResult insertPatrolPlan(LoginInfo li, String planName, int businessType, int dateInterval, Date planStartTime,
                                Date planEndTime, Date firstTime, long treeId, String teamGroup) throws Exception;

    DataResult updatePatrolPlan(LoginInfo li, long id, String planName, int businessType, int dateInterval,
                                Date planStartTime, Date planEndTime, Date firstTime, long treeId, int state,String teamGroup) throws Exception;

    // =======================

    DataResult selectPatrolAnnounce(LoginInfo li, long id) throws Exception;

    DataResult selectPatrolFlow(LoginInfo li, long id) throws Exception;

    DataResult selectPatrolDetail(LoginInfo li, long id) throws Exception;

    DataResult selectPatrolDispose(LoginInfo li, long id) throws Exception;

    DataResult selectPatrolAccept(LoginInfo li, long id) throws Exception;

    DataResult updatePatrolState(LoginInfo li, long id, int operation, String operationInfo, String acceptScore, String acceptState) throws Exception;

    DataResult updatePatrolTaskState(LoginInfo li, long id, int state) throws Exception;

    DataResult updatePatrolTaskStateList(
            LoginInfo li,
            List<PatrolTaskStateListDto> dtoList
    ) throws Exception;

    DataResult updatePatrolTask(LoginInfo li, long id, int state, String recordedValue) throws Exception;

    DataResult updatePatrolDetail(
            LoginInfo li, long id, String orderException,
            String filePicCode, String fileAudioCode, String fileVideoCode
    ) throws Exception;

    DataResult updatePatrolDispose(
            LoginInfo li, long id, String faultType, String faultReason, String emState, String disposeResult,
            String fileOldPicCode, String fileOldAudioCode, String fileOldVideoCode,
            String fileNewPicCode, String fileNewAudioCode, String fileNewVideoCode
    ) throws Exception;

    DataResult deletePatrolPlan(LoginInfo li, long id) throws Exception;

    String getPatrolCode(Date date) throws Exception;

    void insertFlow(
            long patrolId, int flowType, long sourceId, long employeeId, String flowDesc, Date
            date
    ) throws Exception;

    DataResult receivePatrol(LoginInfo loginInfo, String id) throws Exception;

    DataResult transferPatrol(LoginInfo loginInfo, String id) throws Exception;

    DataResult nullifyPatrol(LoginInfo loginInfo, String id) throws Exception;

    Map<String, Object> getInfoWord(LoginInfo loginInfo,String objId);
}


